<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <!-- Meta 信息 -->
  <meta name="description" content="Transformer-Based Sustain Pedal Reconstruction for Expressive Piano Performance MIDI">
  <meta name="keywords" content="sustain pedal, expressive piano performance, MIDI, transformer, deep learning, music generation, pedal reconstruction">
  <meta name="author" content="Wenhao Liu, György Fazekas, Jingjing Tang">

  <!-- 页面标题 -->
  <title>Pedal Reconstruction Comparison</title>

  <!-- 样式与图标 -->
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
    integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
  <link rel="stylesheet" href="styles.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.0/font/bootstrap-icons.css">
  <meta name="theme-color" content="#003366">
</head>

<body>
<div class="text-center" >
  <div class="container">
    <div class="text-wrap" style="max-width: 1000px; margin: auto;">
      <h1 class="pt-5">
        Transformer-Based Sustain Pedal Reconstruction for Expressive Piano Performance MIDI
      </h1>
      <br>
    </div>

    <!-- 作者信息 -->
    <p style="font-size: 1.3em; margin-bottom: 0;">
      <a href="#">Wenhao Liu<sup>1</sup></a>,
      <a href="#">György Fazekas<sup>1</sup></a>,
      <a href="#">Jingjing Tang<sup>1</sup></a>
    </p>
    <p style="margin-top: 20px;">
      <sup>1</sup> Center for Digital Music, Queen Mary University of London, London, United Kingdom
    </p>

    <!-- 链接按钮 -->
    <div class="m-3">
      <a class="btn btn-outline-dark" href="https://github.com/liulizhizi/Pedal_genbymidibert" target="_blank" type="button">
        <i class="bi bi-code-slash"></i> Code
      </a>
    </div>
  </div>
</div>
<div class="container my-5" style="max-width: 950px;">
  <h2 class="mb-4">Introduction</h2>

  <ul style="font-size: 1.1em; line-height: 1.6;">
    <li><strong>Sustain pedal:</strong> Essential for expressive piano performance
      <ul>
        <li>Smooth legato articulation</li>
        <li>Extended resonance</li>
        <li>Enhanced harmonic continuity</li>
      </ul>
    </li>

    <li><strong>Expressive Performance Rendering (EPR):</strong>
      <ul>
        <li>Task: generate human-like performances from scores or MIDI</li>
        <li>Existing systems often ignore pedal information or generate it along with note features</li>
        <li>Pedal is continuous, spans multiple notes → prediction is challenging</li>
      </ul>
    </li>

    <li><strong>Our approach:</strong> Transformer-based model to reconstruct sustain pedal
      <ul>
        <li>Tokenize MIDI using REMI and multi-stream representation</li>
        <li>Predict pedal onset and duration accurately</li>
        <li>Compatible with EPR systems to enhance pedaling generation</li>
      </ul>
    </li>
  </ul>
</div>

<div class="container mt-5" style="max-width: 950px;">
    <section class="my-5">
        <h2 class="mb-3">Pedal Reconstruction Comparison</h2>
        <p>
            This section presents the comparison of four conditions:
            <b>Real Performance</b>, <b>Partial Reconstruction</b>, <b>Full Reconstruction</b>,
            and <b>No Pedal</b>. We provide 5 representative samples, each including all four conditions.
        </p>

        <div class="table-responsive">
            <table class="table table-bordered table-sm align-middle text-center">
                <thead class="table-light">
                    <tr>
                        <th>Condition</th>
                        <th>Sample 1</th>
                        <th>Sample 2</th>
                        <th>Sample 3</th>
                        <th>Sample 4</th>
                        <th>Sample 5</th>
                    </tr>
                </thead>
                <tbody>
                    <!-- Row 1: Real Performance -->
                    <tr>
                        <td><b>Real Performance</b></td>
                        <td>
                            <audio id="s1_real" onended="audioEnd('b1_real','s1_real')">
                                <source src="./asset/audio/MIDI-Unprocessed_05_R1_2008_01-04_ORIG_MID--AUDIO_05_R1_2008_wav--3/ori_ab15s.mp3" type="audio/mpeg">
                            </audio>
                            <button id="b1_real" class="btn btn-outline-dark btn-sm"
                                onclick="togglePlay('b1_real','s1_real')">Play</button>
                        </td>
                        <td>
                            <audio id="s2_real" onended="audioEnd('b2_real','s2_real')">
                                <source src="./asset/audio/MIDI-Unprocessed_11_R1_2009_06-09_ORIG_MID--AUDIO_11_R1_2009_11_R1_2009_07_WAV/ori_ab15s.mp3" type="audio/mpeg">
                            </audio>
                            <button id="b2_real" class="btn btn-outline-dark btn-sm"
                                onclick="togglePlay('b2_real','s2_real')">Play</button>
                        </td>
                        <td>
                            <audio id="s3_real" onended="audioEnd('b3_real','s3_real')">
                                <source src="./asset/audio/MIDI-Unprocessed_057_PIANO057_MID--AUDIO-split_07-07-17_Piano-e_1-07_wav--3/ori_ab15s.mp3" type="audio/mpeg">
                            </audio>
                            <button id="b3_real" class="btn btn-outline-dark btn-sm"
                                onclick="togglePlay('b3_real','s3_real')">Play</button>
                        </td>
                        <td>
                            <audio id="s4_real" onended="audioEnd('b4_real','s4_real')">
                                <source src="./asset/audio/MIDI-Unprocessed_R2_D2-12-13-15_mid--AUDIO-from_mp3_12_R2_2015_wav--3/ori_ab15s.mp3" type="audio/mpeg">
                            </audio>
                            <button id="b4_real" class="btn btn-outline-dark btn-sm"
                                onclick="togglePlay('b4_real','s4_real')">Play</button>
                        </td>
                        <td>
                            <audio id="s5_real" onended="audioEnd('b5_real','s5_real')">
                                <source src="./asset/audio/MIDI-Unprocessed_Recital9-11_MID--AUDIO_09_R1_2018_wav--1/ori_ab15s.mp3" type="audio/mpeg">
                            </audio>
                            <button id="b5_real" class="btn btn-outline-dark btn-sm"
                                onclick="togglePlay('b5_real','s5_real')">Play</button>
                        </td>
                    </tr>

                    <!-- Row 2: Partial Reconstruction -->
                    <tr>
                        <td>Partial Reconstruction</td>
                        <td>
                            <audio id="s1_partial" onended="audioEnd('b1_partial','s1_partial')">
                                <source src="./asset/audio/MIDI-Unprocessed_05_R1_2008_01-04_ORIG_MID--AUDIO_05_R1_2008_wav--3/single_ab15s.mp3" type="audio/mpeg">
                            </audio>
                            <button id="b1_partial" class="btn btn-outline-dark btn-sm"
                                onclick="togglePlay('b1_partial','s1_partial')">Play</button>
                        </td>
                        <td>
                            <audio id="s2_partial" onended="audioEnd('b2_partial','s2_partial')">
                                <source src="./asset/audio/MIDI-Unprocessed_11_R1_2009_06-09_ORIG_MID--AUDIO_11_R1_2009_11_R1_2009_07_WAV/single_ab15s.mp3" type="audio/mpeg">
                            </audio>
                            <button id="b2_partial" class="btn btn-outline-dark btn-sm"
                                onclick="togglePlay('b2_partial','s2_partial')">Play</button>
                        </td>
                        <td>
                            <audio id="s3_partial" onended="audioEnd('b3_partial','s3_partial')">
                                <source src="./asset/audio/MIDI-Unprocessed_057_PIANO057_MID--AUDIO-split_07-07-17_Piano-e_1-07_wav--3/single_ab15s.mp3" type="audio/mpeg">
                            </audio>
                            <button id="b3_partial" class="btn btn-outline-dark btn-sm"
                                onclick="togglePlay('b3_partial','s3_partial')">Play</button>
                        </td>
                        <td>
                            <audio id="s4_partial" onended="audioEnd('b4_partial','s4_partial')">
                                <source src="./asset/audio/MIDI-Unprocessed_R2_D2-12-13-15_mid--AUDIO-from_mp3_12_R2_2015_wav--3/single_ab15s.mp3" type="audio/mpeg">
                            </audio>
                            <button id="b4_partial" class="btn btn-outline-dark btn-sm"
                                onclick="togglePlay('b4_partial','s4_partial')">Play</button>
                        </td>
                        <td>
                            <audio id="s5_partial" onended="audioEnd('b5_partial','s5_partial')">
                                <source src="./asset/audio/MIDI-Unprocessed_Recital9-11_MID--AUDIO_09_R1_2018_wav--1/single_ab15s.mp3" type="audio/mpeg">
                            </audio>
                            <button id="b5_partial" class="btn btn-outline-dark btn-sm"
                                onclick="togglePlay('b5_partial','s5_partial')">Play</button>
                        </td>
                    </tr>

                    <!-- Row 3: Full Reconstruction -->
                    <tr>
                        <td>Full Reconstruction</td>
                        <td>
                            <audio id="s1_full" onended="audioEnd('b1_full','s1_full')">
                                <source src="./asset/audio/MIDI-Unprocessed_05_R1_2008_01-04_ORIG_MID--AUDIO_05_R1_2008_wav--3/mul_ab15s.mp3" type="audio/mpeg">
                            </audio>
                            <button id="b1_full" class="btn btn-outline-dark btn-sm"
                                onclick="togglePlay('b1_full','s1_full')">Play</button>
                        </td>
                        <td>
                            <audio id="s2_full" onended="audioEnd('b2_full','s2_full')">
                                <source src="./asset/audio/MIDI-Unprocessed_11_R1_2009_06-09_ORIG_MID--AUDIO_11_R1_2009_11_R1_2009_07_WAV/mul_ab15s.mp3" type="audio/mpeg">
                            </audio>
                            <button id="b2_full" class="btn btn-outline-dark btn-sm"
                                onclick="togglePlay('b2_full','s2_full')">Play</button>
                        </td>
                        <td>
                            <audio id="s3_full" onended="audioEnd('b3_full','s3_full')">
                                <source src="./asset/audio/MIDI-Unprocessed_057_PIANO057_MID--AUDIO-split_07-07-17_Piano-e_1-07_wav--3/mul_ab15s.mp3" type="audio/mpeg">
                            </audio>
                            <button id="b3_full" class="btn btn-outline-dark btn-sm"
                                onclick="togglePlay('b3_full','s3_full')">Play</button>
                        </td>
                        <td>
                            <audio id="s4_full" onended="audioEnd('b4_full','s4_full')">
                                <source src="./asset/audio/MIDI-Unprocessed_R2_D2-12-13-15_mid--AUDIO-from_mp3_12_R2_2015_wav--3/mul_ab15s.mp3" type="audio/mpeg">
                            </audio>
                            <button id="b4_full" class="btn btn-outline-dark btn-sm"
                                onclick="togglePlay('b4_full','s4_full')">Play</button>
                        </td>
                        <td>
                            <audio id="s5_full" onended="audioEnd('b5_full','s5_full')">
                                <source src="./asset/audio/MIDI-Unprocessed_Recital9-11_MID--AUDIO_09_R1_2018_wav--1/mul_ab15s.mp3" type="audio/mpeg">
                            </audio>
                            <button id="b5_full" class="btn btn-outline-dark btn-sm"
                                onclick="togglePlay('b5_full','s5_full')">Play</button>
                        </td>
                    </tr>

                    <!-- Row 4: No Pedal -->
                    <tr>
                        <td>No Pedal</td>
                        <td>
                            <audio id="s1_nopedal" onended="audioEnd('b1_nopedal','s1_nopedal')">
                                <source src="./asset/audio/MIDI-Unprocessed_05_R1_2008_01-04_ORIG_MID--AUDIO_05_R1_2008_wav--3/no_pedal_ab15s.mp3" type="audio/mpeg">
                            </audio>
                            <button id="b1_nopedal" class="btn btn-outline-dark btn-sm"
                                onclick="togglePlay('b1_nopedal','s1_nopedal')">Play</button>
                        </td>
                        <td>
                            <audio id="s2_nopedal" onended="audioEnd('b2_nopedal','s2_nopedal')">
                                <source src="./asset/audio/MIDI-Unprocessed_11_R1_2009_06-09_ORIG_MID--AUDIO_11_R1_2009_11_R1_2009_07_WAV/no_pedal_ab15s.mp3" type="audio/mpeg">
                            </audio>
                            <button id="b2_nopedal" class="btn btn-outline-dark btn-sm"
                                onclick="togglePlay('b2_nopedal','s2_nopedal')">Play</button>
                        </td>
                        <td>
                            <audio id="s3_nopedal" onended="audioEnd('b3_nopedal','s3_nopedal')">
                                <source src="./asset/audio/MIDI-Unprocessed_057_PIANO057_MID--AUDIO-split_07-07-17_Piano-e_1-07_wav--3/no_pedal_ab15s.mp3" type="audio/mpeg">
                            </audio>
                            <button id="b3_nopedal" class="btn btn-outline-dark btn-sm"
                                onclick="togglePlay('b3_nopedal','s3_nopedal')">Play</button>
                        </td>
                        <td>
                            <audio id="s4_nopedal" onended="audioEnd('b4_nopedal','s4_nopedal')">
                                <source src="./asset/audio/MIDI-Unprocessed_R2_D2-12-13-15_mid--AUDIO-from_mp3_12_R2_2015_wav--3/no_pedal_ab15s.mp3" type="audio/mpeg">
                            </audio>
                            <button id="b4_nopedal" class="btn btn-outline-dark btn-sm"
                                onclick="togglePlay('b4_nopedal','s4_nopedal')">Play</button>
                        </td>
                        <td>
                            <audio id="s5_nopedal" onended="audioEnd('b5_nopedal','s5_nopedal')">
                                <source src="./asset/audio/MIDI-Unprocessed_Recital9-11_MID--AUDIO_09_R1_2018_wav--1/no_pedal_ab15s.mp3" type="audio/mpeg">
                            </audio>
                            <button id="b5_nopedal" class="btn btn-outline-dark btn-sm"
                                onclick="togglePlay('b5_nopedal','s5_nopedal')">Play</button>
                        </td>
                    </tr>

                </tbody>
            </table>
        </div>
    </section>
</div>


  <!-- 脚本 -->
  <script>
    function togglePlay(btnId, audioId) {
      var btn = document.getElementById(btnId);
      var audio = document.getElementById(audioId);

      if (audio.paused) {
        audio.play();
        btn.innerHTML = "Stop";
        btn.className = "btn btn-primary btn-sm";
      } else {
        audio.pause();
        btn.innerHTML = "Play";
        btn.className = "btn btn-secondary btn-sm";
      }
    }

    function audioEnd(btnId) {
      var btn = document.getElementById(btnId);
      btn.innerHTML = "Play";
      btn.className = "btn btn-secondary btn-sm";
    }
  </script>
</body>
</html>

